<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: contracts/eoslib/string.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_3fea0bf1ce879ce73e6ecec98007efcd.html">eoslib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">string.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="string_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="types_8hpp.html">eoslib/types.hpp</a>&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="system_8h.html">eoslib/system.h</a>&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="memory_8hpp.html">eoslib/memory.hpp</a>&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="print_8hpp.html">eoslib/print.hpp</a>&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="classeos_1_1string.html">    9</a></span>&#160;  <span class="keyword">class </span><a class="code" href="classeos_1_1string.html">string</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> size; <span class="comment">// size of the string</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    <span class="keywordtype">char</span>* data; <span class="comment">// underlying data</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="keywordtype">bool</span> own_memory; <span class="comment">// true if the object is responsible to clean the memory</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>* refcount; <span class="comment">// shared reference count to the underlying data</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="comment">// Release data if no more string reference to it</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keywordtype">void</span> release_data_if_needed() {</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;      <span class="keywordflow">if</span> (own_memory &amp;&amp; refcount != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        (*refcount)--;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        <span class="keywordflow">if</span> (*refcount == 0) {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;          <a class="code" href="group__memorycppapi.html#gae49c5c6856e62490cbc50145af7ae5a8">free</a>(data);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        }</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;      }</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#ad90c880f029de1b56f9fb811d601fe4c">   31</a></span>&#160;    <a class="code" href="classeos_1_1string.html#ad90c880f029de1b56f9fb811d601fe4c">string</a>() : size(0), data(nullptr), own_memory(false), refcount(nullptr) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a33b404b5178e980f3adcfa5a57853d9a">   38</a></span>&#160;    <a class="code" href="classeos_1_1string.html#a33b404b5178e980f3adcfa5a57853d9a">string</a>(<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> s) : size(s), own_memory(true) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;      data = (<span class="keywordtype">char</span> *)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(s * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      refcount = (<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>*)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>));</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      *refcount = 1;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    }</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#ab690a6ccc27644f4bdf36e1b1fed4467">   50</a></span>&#160;    <a class="code" href="classeos_1_1string.html#ab690a6ccc27644f4bdf36e1b1fed4467">string</a>(<span class="keywordtype">char</span>* d, <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> s, <span class="keywordtype">bool</span> copy) {</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      <a class="code" href="classeos_1_1string.html#afe41799f953ad70eeba8da3ce05310a2">assign</a>(d, s, copy);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="comment">// Copy constructor</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#aebd8f61db294e0b5bb812f4a1542198d">   55</a></span>&#160;    <a class="code" href="classeos_1_1string.html#aebd8f61db294e0b5bb812f4a1542198d">string</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; obj) {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;obj) {</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        data = obj.data;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        size = obj.size;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        own_memory = obj.own_memory;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        refcount = obj.refcount;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordflow">if</span> (refcount != <span class="keyword">nullptr</span>) (*refcount)++;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;      }</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    }</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="comment">// Destructor</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a1150d62d136d78124cf713c1a484f505">   66</a></span>&#160;    <a class="code" href="classeos_1_1string.html#a1150d62d136d78124cf713c1a484f505">~string</a>() {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;      release_data_if_needed();</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="comment">// Get size of the string (in number of bytes)</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a0b5ba99817c8f40cc57b5a9d83ad1c2a">   71</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> <a class="code" href="classeos_1_1string.html#a0b5ba99817c8f40cc57b5a9d83ad1c2a">get_size</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      <span class="keywordflow">return</span> size;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="comment">// Get the underlying data of the string</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a75243f79c55baaf1adf30073607c6ae3">   76</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classeos_1_1string.html#a75243f79c55baaf1adf30073607c6ae3">get_data</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;      <span class="keywordflow">return</span> data;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    }</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="comment">// Check if it owns memory</span></div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#ae7016991f9aa5d06eb8d638bec96a8b8">   81</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classeos_1_1string.html#ae7016991f9aa5d06eb8d638bec96a8b8">is_own_memory</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      <span class="keywordflow">return</span> own_memory;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    }</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="comment">// Get the ref count</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a83f791ad86b15353d74cd5e0eebbec71">   86</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> <a class="code" href="classeos_1_1string.html#a83f791ad86b15353d74cd5e0eebbec71">get_refcount</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      <span class="keywordflow">return</span> *refcount;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#afe41799f953ad70eeba8da3ce05310a2">   97</a></span>&#160;    <span class="keywordtype">string</span>&amp; <a class="code" href="classeos_1_1string.html#afe41799f953ad70eeba8da3ce05310a2">assign</a>(<span class="keywordtype">char</span>* d, <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> s, <span class="keywordtype">bool</span> copy) {</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      release_data_if_needed();</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;      <span class="keywordflow">if</span> (copy) {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        data = (<span class="keywordtype">char</span> *)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(s * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <a class="code" href="group__memorycapi.html#ga59ed1449718a3c27f7622cb3efb845af">memcpy</a>(data, d, s * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        own_memory = <span class="keyword">true</span>;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        refcount = (<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>*)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>));</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        *refcount = 1;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        data = d;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        own_memory = <span class="keyword">false</span>;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        refcount = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      size = s;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a72630676a6de4f9e36da4207f17f1ec8">  123</a></span>&#160;    <span class="keywordtype">string</span> <a class="code" href="classeos_1_1string.html#a72630676a6de4f9e36da4207f17f1ec8">substr</a>(<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> offset, <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> substr_size, <span class="keywordtype">bool</span> copy) {</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>((offset &lt; size) &amp;&amp; (offset + substr_size &lt; size), <span class="stringliteral">&quot;out of bound&quot;</span>);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="classeos_1_1string.html#ad90c880f029de1b56f9fb811d601fe4c">string</a>(data + offset, substr_size, copy);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#ab03ec98576f7bd0cba8ce356b4314e56">  128</a></span>&#160;    <span class="keywordtype">char</span> <a class="code" href="classeos_1_1string.html#ab03ec98576f7bd0cba8ce356b4314e56">operator [] </a>(<span class="keyword">const</span> <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> index) {</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>(index &lt; size, <span class="stringliteral">&quot;index out of bound&quot;</span>);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;      <span class="keywordflow">return</span> *(data + index);</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    }</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a2e571d8e0ba60930c38bb91874ae42c9">  133</a></span>&#160;    <span class="keywordtype">string</span>&amp; <a class="code" href="classeos_1_1string.html#a2e571d8e0ba60930c38bb91874ae42c9">operator = </a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; obj) {</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;      <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;obj) {</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        release_data_if_needed();</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        data = obj.data;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        size = obj.size;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        own_memory = obj.own_memory;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        refcount = obj.refcount;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordflow">if</span> (refcount != <span class="keyword">nullptr</span>) (*refcount)++;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;      }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a0a12d39139e4dbae7b0c88e02193f533">  145</a></span>&#160;    <span class="keywordtype">string</span>&amp; <a class="code" href="classeos_1_1string.html#a0a12d39139e4dbae7b0c88e02193f533">operator += </a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; str){</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>((size + str.size &gt; size) &amp;&amp; (size + str.size &gt; str.size), <span class="stringliteral">&quot;overflow&quot;</span>);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;      <span class="keywordtype">char</span>* new_data;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;      <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> new_size;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;      <span class="keywordflow">if</span> (size &gt; 0 &amp;&amp; *(data + size - 1) == <span class="charliteral">&#39;\0&#39;</span>) {</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="comment">// Null terminated string, remove the \0 when concatenates</span></div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        new_size = size - 1 + str.size;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        new_data = (<span class="keywordtype">char</span> *)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(new_size * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <a class="code" href="group__memorycapi.html#ga59ed1449718a3c27f7622cb3efb845af">memcpy</a>(new_data, data, (size - 1) * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <a class="code" href="group__memorycapi.html#ga59ed1449718a3c27f7622cb3efb845af">memcpy</a>(new_data + size - 1, str.data, str.size * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        new_size = size + str.size;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        new_data = (<span class="keywordtype">char</span> *)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(new_size * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <a class="code" href="group__memorycapi.html#ga59ed1449718a3c27f7622cb3efb845af">memcpy</a>(new_data, data, size * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <a class="code" href="group__memorycapi.html#ga59ed1449718a3c27f7622cb3efb845af">memcpy</a>(new_data + size, str.data, str.size * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      }</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;      <span class="comment">// Release old data</span></div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      release_data_if_needed();</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;      <span class="comment">// Assign new data</span></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;      data = new_data;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      size = new_size;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;      own_memory = <span class="keyword">true</span>;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;      refcount = (<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>*)<a class="code" href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">malloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>));</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;      *refcount = 1;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    }</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="comment">// Compare two strings</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="comment">// Return an integral value indicating the relationship between strings</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="comment">//   &gt;0 if the first string is greater than the second string</span></div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="comment">//   0 if both strings are equal</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="comment">//   &lt;0 if the first string is smaller than the second string</span></div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="comment">// The return value also represents the difference between the first character that doesn&#39;t match of the two strings</span></div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">  182</a></span>&#160;    <a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> <a class="code" href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">compare</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; str)<span class="keyword"> const </span>{</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;      <a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> result;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;      <span class="keywordflow">if</span> (size == str.size) {</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        result = <a class="code" href="group__memorycapi.html#ga174f86fdde222a278e5524a8aea63da9">memcmp</a>(data, str.data, size);</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;      } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (size &lt; str.size) {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        result = <a class="code" href="group__memorycapi.html#ga174f86fdde222a278e5524a8aea63da9">memcmp</a>(data, str.data, size);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordflow">if</span> (result == 0) {</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;          <span class="comment">// String is equal up to size of the shorter string, return the difference in byte of the next character</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;          result = 0 - (<span class="keywordtype">unsigned</span> char)str.data[size];</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        }</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;      } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (size &gt; str.size) {</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        result = <a class="code" href="group__memorycapi.html#ga174f86fdde222a278e5524a8aea63da9">memcmp</a>(data, str.data, str.size);</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        <span class="keywordflow">if</span> (result == 0) {</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;          <span class="comment">// String is equal up to size of the shorter string, return the difference in byte of the next character</span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;          result = (<span class="keywordtype">unsigned</span> char)data[str.size];</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        }</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;      }</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;      <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a91fd184cf0f9333c217130cebd4d7876">  202</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="classeos_1_1string.html#a91fd184cf0f9333c217130cebd4d7876">operator &lt; </a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; lhs, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; rhs) {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;      <span class="keywordflow">return</span> lhs.<a class="code" href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">compare</a>(rhs) &lt; 0;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    }</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#abf763aa94a8644b190f43d6b026893a2">  206</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="classeos_1_1string.html#abf763aa94a8644b190f43d6b026893a2">operator &gt; </a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; lhs, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; rhs) {</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;      <span class="keywordflow">return</span> lhs.<a class="code" href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">compare</a>(rhs) &gt; 0;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    }</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a747feeacef8c26d89dafe7a9e32e2439">  210</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="classeos_1_1string.html#a747feeacef8c26d89dafe7a9e32e2439">operator == </a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; lhs, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; rhs) {</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;      <span class="keywordflow">return</span> lhs.<a class="code" href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">compare</a>(rhs) == 0;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    }</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#ab8b27a889dc5ffef4a9cc7a1d1905b9c">  214</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="classeos_1_1string.html#ab8b27a889dc5ffef4a9cc7a1d1905b9c">operator != </a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; lhs, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; rhs) {</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;      <span class="keywordflow">return</span> lhs.<a class="code" href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">compare</a>(rhs) != 0;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#a68ca7a7a35654ab6f2a2683b7d329442">  218</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">string</span> <a class="code" href="classeos_1_1string.html#a68ca7a7a35654ab6f2a2683b7d329442">operator + </a>(<span class="keywordtype">string</span> lhs, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; rhs) {</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;      <span class="keywordflow">return</span> lhs += rhs;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    }</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="classeos_1_1string.html#af914bab4fa114dced3273edd999e17fb">  222</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classeos_1_1string.html#af914bab4fa114dced3273edd999e17fb">print</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;      <span class="keywordflow">if</span> (size &gt; 0 &amp;&amp; *(data + size - 1) == <span class="charliteral">&#39;\0&#39;</span>) {</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <span class="comment">// Null terminated string</span></div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        <a class="code" href="group__consolecapi.html#gaa99be0cc1b9e5cbbc2b12a43537e7ed3">prints</a>(data);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        <span class="comment">// Non null terminated string</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <span class="comment">// We need to specify the size of string so it knows where to stop</span></div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <a class="code" href="group__consolecapi.html#ga63ff8a7c0b046968ab2864df7284c910">prints_l</a>(data, size);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;      }</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;   }</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  };</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;}</div><div class="ttc" id="classeos_1_1string_html_a83f791ad86b15353d74cd5e0eebbec71"><div class="ttname"><a href="classeos_1_1string.html#a83f791ad86b15353d74cd5e0eebbec71">eosio::string::get_refcount</a></div><div class="ttdeci">const uint32_t get_refcount() const </div><div class="ttdef"><b>Definition:</b> string.hpp:86</div></div>
<div class="ttc" id="classeos_1_1string_html_a747feeacef8c26d89dafe7a9e32e2439"><div class="ttname"><a href="classeos_1_1string.html#a747feeacef8c26d89dafe7a9e32e2439">eosio::string::operator==</a></div><div class="ttdeci">friend bool operator==(const string &amp;lhs, const string &amp;rhs)</div><div class="ttdef"><b>Definition:</b> string.hpp:210</div></div>
<div class="ttc" id="group__systemcapi_html_gae2a6ebaf48fe7c69f847ae18f109d09a"><div class="ttname"><a href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a></div><div class="ttdeci">void assert(uint32_t test, const char *cstr)</div><div class="ttdoc">Aborts processing of this message and unwinds all pending changes. </div></div>
<div class="ttc" id="print_8hpp_html"><div class="ttname"><a href="print_8hpp.html">print.hpp</a></div></div>
<div class="ttc" id="group__memorycapi_html_ga174f86fdde222a278e5524a8aea63da9"><div class="ttname"><a href="group__memorycapi.html#ga174f86fdde222a278e5524a8aea63da9">memcmp</a></div><div class="ttdeci">int32_t memcmp(void *ptr1, const void *ptr2, uint32_t num)</div><div class="ttdoc">Copy a block of memory from source to destination. </div></div>
<div class="ttc" id="classeos_1_1string_html_af914bab4fa114dced3273edd999e17fb"><div class="ttname"><a href="classeos_1_1string.html#af914bab4fa114dced3273edd999e17fb">eosio::string::print</a></div><div class="ttdeci">void print() const </div><div class="ttdef"><b>Definition:</b> string.hpp:222</div></div>
<div class="ttc" id="classeos_1_1string_html_ab8b27a889dc5ffef4a9cc7a1d1905b9c"><div class="ttname"><a href="classeos_1_1string.html#ab8b27a889dc5ffef4a9cc7a1d1905b9c">eosio::string::operator!=</a></div><div class="ttdeci">friend bool operator!=(const string &amp;lhs, const string &amp;rhs)</div><div class="ttdef"><b>Definition:</b> string.hpp:214</div></div>
<div class="ttc" id="classeos_1_1string_html_ab03ec98576f7bd0cba8ce356b4314e56"><div class="ttname"><a href="classeos_1_1string.html#ab03ec98576f7bd0cba8ce356b4314e56">eosio::string::operator[]</a></div><div class="ttdeci">char operator[](const uint32_t index)</div><div class="ttdef"><b>Definition:</b> string.hpp:128</div></div>
<div class="ttc" id="classeos_1_1string_html_ae7016991f9aa5d06eb8d638bec96a8b8"><div class="ttname"><a href="classeos_1_1string.html#ae7016991f9aa5d06eb8d638bec96a8b8">eosio::string::is_own_memory</a></div><div class="ttdeci">const bool is_own_memory() const </div><div class="ttdef"><b>Definition:</b> string.hpp:81</div></div>
<div class="ttc" id="classeos_1_1string_html_a75243f79c55baaf1adf30073607c6ae3"><div class="ttname"><a href="classeos_1_1string.html#a75243f79c55baaf1adf30073607c6ae3">eosio::string::get_data</a></div><div class="ttdeci">const char * get_data() const </div><div class="ttdef"><b>Definition:</b> string.hpp:76</div></div>
<div class="ttc" id="classeos_1_1string_html_a2e571d8e0ba60930c38bb91874ae42c9"><div class="ttname"><a href="classeos_1_1string.html#a2e571d8e0ba60930c38bb91874ae42c9">eosio::string::operator=</a></div><div class="ttdeci">string &amp; operator=(const string &amp;obj)</div><div class="ttdef"><b>Definition:</b> string.hpp:133</div></div>
<div class="ttc" id="classeos_1_1string_html_ab690a6ccc27644f4bdf36e1b1fed4467"><div class="ttname"><a href="classeos_1_1string.html#ab690a6ccc27644f4bdf36e1b1fed4467">eosio::string::string</a></div><div class="ttdeci">string(char *d, uint32_t s, bool copy)</div><div class="ttdef"><b>Definition:</b> string.hpp:50</div></div>
<div class="ttc" id="classeos_1_1string_html_a0a12d39139e4dbae7b0c88e02193f533"><div class="ttname"><a href="classeos_1_1string.html#a0a12d39139e4dbae7b0c88e02193f533">eosio::string::operator+=</a></div><div class="ttdeci">string &amp; operator+=(const string &amp;str)</div><div class="ttdef"><b>Definition:</b> string.hpp:145</div></div>
<div class="ttc" id="types_8hpp_html"><div class="ttname"><a href="types_8hpp.html">types.hpp</a></div></div>
<div class="ttc" id="group__memorycapi_html_ga59ed1449718a3c27f7622cb3efb845af"><div class="ttname"><a href="group__memorycapi.html#ga59ed1449718a3c27f7622cb3efb845af">memcpy</a></div><div class="ttdeci">void * memcpy(void *destination, const void *source, uint32_t num)</div><div class="ttdoc">Copy a block of memory from source to destination. </div></div>
<div class="ttc" id="group__consolecapi_html_ga63ff8a7c0b046968ab2864df7284c910"><div class="ttname"><a href="group__consolecapi.html#ga63ff8a7c0b046968ab2864df7284c910">prints_l</a></div><div class="ttdeci">void prints_l(const char *cstr, uint32_t len)</div><div class="ttdoc">Prints string. </div></div>
<div class="ttc" id="classeos_1_1string_html_ad90c880f029de1b56f9fb811d601fe4c"><div class="ttname"><a href="classeos_1_1string.html#ad90c880f029de1b56f9fb811d601fe4c">eosio::string::string</a></div><div class="ttdeci">string()</div><div class="ttdef"><b>Definition:</b> string.hpp:31</div></div>
<div class="ttc" id="classeos_1_1string_html_afe41799f953ad70eeba8da3ce05310a2"><div class="ttname"><a href="classeos_1_1string.html#afe41799f953ad70eeba8da3ce05310a2">eosio::string::assign</a></div><div class="ttdeci">string &amp; assign(char *d, uint32_t s, bool copy)</div><div class="ttdef"><b>Definition:</b> string.hpp:97</div></div>
<div class="ttc" id="group__memorycppapi_html_ga733d053a4e90451886d476e7f560bf9c"><div class="ttname"><a href="group__memorycppapi.html#ga733d053a4e90451886d476e7f560bf9c">eosio::malloc</a></div><div class="ttdeci">void * malloc(uint32_t size)</div><div class="ttdoc">Allocate a block of memory. </div><div class="ttdef"><b>Definition:</b> memory.hpp:494</div></div>
<div class="ttc" id="group__consolecapi_html_gaa99be0cc1b9e5cbbc2b12a43537e7ed3"><div class="ttname"><a href="group__consolecapi.html#gaa99be0cc1b9e5cbbc2b12a43537e7ed3">prints</a></div><div class="ttdeci">void prints(const char *cstr)</div><div class="ttdoc">Prints string. </div></div>
<div class="ttc" id="group__types_html_ga06896e8c53f721507066c079052171f8"><div class="ttname"><a href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a></div><div class="ttdeci">unsigned long uint32_t</div><div class="ttdef"><b>Definition:</b> types.h:18</div></div>
<div class="ttc" id="classeos_1_1string_html_a68ca7a7a35654ab6f2a2683b7d329442"><div class="ttname"><a href="classeos_1_1string.html#a68ca7a7a35654ab6f2a2683b7d329442">eosio::string::operator+</a></div><div class="ttdeci">friend string operator+(string lhs, const string &amp;rhs)</div><div class="ttdef"><b>Definition:</b> string.hpp:218</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdef"><b>Definition:</b> math.hpp:8</div></div>
<div class="ttc" id="classeos_1_1string_html_a1150d62d136d78124cf713c1a484f505"><div class="ttname"><a href="classeos_1_1string.html#a1150d62d136d78124cf713c1a484f505">eosio::string::~string</a></div><div class="ttdeci">~string()</div><div class="ttdef"><b>Definition:</b> string.hpp:66</div></div>
<div class="ttc" id="group__memorycppapi_html_gae49c5c6856e62490cbc50145af7ae5a8"><div class="ttname"><a href="group__memorycppapi.html#gae49c5c6856e62490cbc50145af7ae5a8">eosio::free</a></div><div class="ttdeci">void free(void *ptr)</div><div class="ttdoc">Free a block of memory. </div><div class="ttdef"><b>Definition:</b> memory.hpp:529</div></div>
<div class="ttc" id="group__types_html_ga0d2e949ab6a1bb62f1b295cc79bc1f60"><div class="ttname"><a href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a></div><div class="ttdeci">long int32_t</div><div class="ttdef"><b>Definition:</b> types.h:19</div></div>
<div class="ttc" id="system_8h_html"><div class="ttname"><a href="system_8h.html">system.h</a></div></div>
<div class="ttc" id="classeos_1_1string_html_abf763aa94a8644b190f43d6b026893a2"><div class="ttname"><a href="classeos_1_1string.html#abf763aa94a8644b190f43d6b026893a2">eosio::string::operator&gt;</a></div><div class="ttdeci">friend bool operator&gt;(const string &amp;lhs, const string &amp;rhs)</div><div class="ttdef"><b>Definition:</b> string.hpp:206</div></div>
<div class="ttc" id="classeos_1_1string_html_a0b5ba99817c8f40cc57b5a9d83ad1c2a"><div class="ttname"><a href="classeos_1_1string.html#a0b5ba99817c8f40cc57b5a9d83ad1c2a">eosio::string::get_size</a></div><div class="ttdeci">const uint32_t get_size() const </div><div class="ttdef"><b>Definition:</b> string.hpp:71</div></div>
<div class="ttc" id="classeos_1_1string_html_aebd8f61db294e0b5bb812f4a1542198d"><div class="ttname"><a href="classeos_1_1string.html#aebd8f61db294e0b5bb812f4a1542198d">eosio::string::string</a></div><div class="ttdeci">string(const string &amp;obj)</div><div class="ttdef"><b>Definition:</b> string.hpp:55</div></div>
<div class="ttc" id="classeos_1_1string_html"><div class="ttname"><a href="classeos_1_1string.html">eosio::string</a></div><div class="ttdef"><b>Definition:</b> string.hpp:9</div></div>
<div class="ttc" id="classeos_1_1string_html_a72630676a6de4f9e36da4207f17f1ec8"><div class="ttname"><a href="classeos_1_1string.html#a72630676a6de4f9e36da4207f17f1ec8">eosio::string::substr</a></div><div class="ttdeci">string substr(uint32_t offset, uint32_t substr_size, bool copy)</div><div class="ttdef"><b>Definition:</b> string.hpp:123</div></div>
<div class="ttc" id="classeos_1_1string_html_a33b404b5178e980f3adcfa5a57853d9a"><div class="ttname"><a href="classeos_1_1string.html#a33b404b5178e980f3adcfa5a57853d9a">eosio::string::string</a></div><div class="ttdeci">string(uint32_t s)</div><div class="ttdef"><b>Definition:</b> string.hpp:38</div></div>
<div class="ttc" id="memory_8hpp_html"><div class="ttname"><a href="memory_8hpp.html">memory.hpp</a></div></div>
<div class="ttc" id="classeos_1_1string_html_a6a0949ef543b02f88c39645f32a63ab6"><div class="ttname"><a href="classeos_1_1string.html#a6a0949ef543b02f88c39645f32a63ab6">eosio::string::compare</a></div><div class="ttdeci">int32_t compare(const string &amp;str) const </div><div class="ttdef"><b>Definition:</b> string.hpp:182</div></div>
<div class="ttc" id="classeos_1_1string_html_a91fd184cf0f9333c217130cebd4d7876"><div class="ttname"><a href="classeos_1_1string.html#a91fd184cf0f9333c217130cebd4d7876">eosio::string::operator&lt;</a></div><div class="ttdeci">friend bool operator&lt;(const string &amp;lhs, const string &amp;rhs)</div><div class="ttdef"><b>Definition:</b> string.hpp:202</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
